import flash.ui.*;

static public var STAGE:Stage;
static public var STAGEX:Number;
static public var STAGEY:Number;
static public var SELF:TAF;
static private var INITED:Boolean;
static public var TIME:int;
static public var $NONE:Number = -2147483648;
static public var POINT:Point = new Point;
static public var RECT:Rectangle = new Rectangle;

static private var KEYCODE:Object = {
	'0':'0'.charCodeAt(), '1':'1'.charCodeAt(), '2':'2'.charCodeAt(), '3':'3'.charCodeAt(), '4':'4'.charCodeAt(), '5':'5'.charCodeAt(), 
	'6':'6'.charCodeAt(), '7':'7'.charCodeAt(), '8':'8'.charCodeAt(), '9':'9'.charCodeAt(), 
	'~':192, '`':192, '-':189, '_':189, '=':187, '+':187,
	'[':219, '{':219, ']':221, '}':221, 
	'|':220, '\\':220, ':':186, ';':186, '"':222, '\'':222, ',':188, '<':188, '.':190, '>':190, '/':191, '?':191
}
//------------------------------------------------------------------------------------------------------------
static private var rxNumberComma:RegExp = /(?<=\d)(?=(\d\d\d)+$)/

static private var rxBrit:RegExp = /((?:[a-zA-z\\$]\w*\s*|\B|\s*)\()([^()]*)(\))/g;
static private var rxGetBrit:RegExp = /\$\$BRIT(\d+)/g;

static private var rxRemoveSpace:RegExp = /\s/g;

static private var rxTrim:RegExp = /^\s*|\s*$/g;
static private var rxRemoveBrace:RegExp = /^[{]|[}]$/g;
static private var rxRemoveQuot:RegExp = /^(')(.*)(')$/g;

static private var rxExpression:RegExp = /\+|-|\*|%|\^|~U|~N|~|_|\>=|\<=|\<\<|\>\>|\<|\>|===|==/g;
static private var rxUINT:RegExp = /^0x[A-Fa-f0-9]+$/;
static private var rxNUMBER:RegExp = /^((-?)\d*(\.?\d+)){1,}$/;
static private var rxVARIABLE:RegExp = /^[a-zA-z$_][a-zA-z$_0-9.()]*$/;
static private var rxFUNCTION:RegExp = /^((?:[a-zA-z$]\w*\s*)\()(.*)(\)\s*)/;
static private var rxNSEP:RegExp= /\n|;/g;
static private var rxRSEP:RegExp= /\r|;/g;
static private var rxIsArray:RegExp= /^(?:(?:'(?:\s|\S)*')|(?:\([^()]*\))|(?:\{[^{}]*\})|(?:\[[^\[\]]*\])|(?:[a-zA-z\\$]\w*)|(?:(?:(?:-?)\d*(?:\.?\d+)){1,})),/;

static private var ENCODE:String = '!"#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~￠￡¤￥|§¨ⓒª≪￢­®?°±²³´μ¶·¸¹º≫¼½¾¿AAAAAAÆCEEEEIIIIÐNOOOOO×ØUUUUYÞßaaaaaaæceeeeiiiiðnooooo÷øuuuuyþy！＂＃＄％＆＇（）＊＋，－．／０１２３４５６７８９：；＜＝＞？＠ＡＢＣＤＥＦＧＨＩＪＫＬＭＮＯＰＱＲＳＴＵＶＷＸＹＺ［＼］＾＿｀ａｂｃｄｅｆｇｈｉｊ';
//------------------------------------------------------------------------------------------------------------
[Embed ( source="pbj/alphaBlend.pbj", mimeType="application/octet-stream" ) ]
static internal var ALPHA:Class;
[Embed ( source="pbj/overlayBlend.pbj", mimeType="application/octet-stream" ) ]
static internal var OVERLAY:Class;
[Embed ( source="pbj/resize.pbj", mimeType="application/octet-stream" ) ]
static public var RESIZER:Class;
[Embed ( source="pbj/resizeSimple.pbj", mimeType="application/octet-stream" ) ]
static public var RESIZERSIMPLE:Class;

static private var resizer:ShaderFilter;
static private var resizerSimple:ShaderFilter;
//------------------------------------------------------------------------------------------------------------
static private var master:SoundTransform = new SoundTransform;
static private var masterInfo:Object = {volume:1, pan:0};
static private var contextInfo:Object = {volume:1, pan:0};